// src/main/java/org/zachary/creditbusiness/hotel/controller/HotelRecommendController.java
package org.zachary.creditbusiness.hotel.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.zachary.creditbusiness.hotel.entity.Hotel;
import org.zachary.creditbusiness.hotel.service.HotelRecommendService;

import java.util.List;

@RestController
@RequestMapping("/hotels/")
public class HotelRecommendController {

    @Autowired
    private HotelRecommendService hotelRecommendService;

    /**
     * GET /hotels/recommend/tops?userId={userId}
     */
    @GetMapping("/tops")
    public List<Hotel> getHotelTops(@RequestParam("userId") Integer userId) {
        return hotelRecommendService.getHotelRecommendTops(userId);
    }
}